home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 December / MACPOWER-1997-12.ISO.7z / MACPOWER-1997-12.ISO / AMUG / PROGRAMMING / Raven 1.2.sit / Raven 1.2 / Source / Foundation / Common / ZNewAndDelete.h < prev    next >
Text File  |  1997-08-02  |  1KB  |  61 lines

  1. /*
  2.  *  File:       ZNewAndDelete.h
  3.  *  Summary:    Default Raven global operator new.
  4.  *  Written by: Jesse Jones
  5.  *
  6.  *  Copyright ゥ 1997 Jesse Jones. 
  7.  *    For conditions of distribution and use, see copyright notice in ZTypes.h  
  8.  *
  9.  *  Change History (most recent first):
  10.  *
  11.  *         <2>     8/01/97    JDJ        Added gValidateHeapOnDelete.
  12.  *         <1>     1/28/97    JDJ        Created
  13.  */
  14.  
  15. #pragma once
  16.  
  17. #include <New.h>
  18.  
  19.  
  20. //-----------------------------------
  21. //    Forward References
  22. //
  23. class TMemoryHeap;
  24.  
  25.  
  26. //-----------------------------------
  27. //    Globals
  28. //
  29. extern TMemoryHeap* gObjectHeap;
  30.  
  31. #if DEBUG
  32. extern bool gValidateHeapOnNew;
  33. extern bool gValidateHeapOnDelete;
  34. extern bool gFreeDeletedBlocks;    
  35. #endif
  36.  
  37.  
  38. // ===================================================================================
  39. //    New and Delete
  40. // ===================================================================================
  41. void*         RavenOperatorNew(size_t size);
  42.             // Note that you can disable Raven's operator new by defining RAVEN_OPERATOR_NEW
  43.             // as 0.
  44.  
  45. void         RavenOperatorDelete(void* obj);
  46.  
  47.  
  48. // ===================================================================================
  49. //    class TDisableLeakChecking
  50. //        While one of these objects is alive newly allocated blocks are not leak checked.
  51. // ===================================================================================
  52. class TDisableLeakChecking {
  53.  
  54. public:
  55.                         ~TDisableLeakChecking();
  56.                         
  57.                         TDisableLeakChecking();
  58. };
  59.  
  60.  
  61.